home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 016a / dmake38.zip / STARTUP.TCC < prev    next >
Text File  |  1992-01-25  |  4KB  |  155 lines

  1. # MSDOS DMAKE startup file.  Customize to suit your needs.
  2. # Assumes MKS toolkit for the tool commands, and Turbo-C.  Change as req'd.
  3. # See the documentation for a description of internally defined macros.
  4. #
  5. # Disable warnings for macros redefined here that were given
  6. # on the command line.
  7. __.SILENT := $(.SILENT)
  8. .SILENT   := yes
  9.  
  10. # Configuration parameters for DMAKE startup.mk file
  11. # Set these to NON-NULL if you wish to turn the parameter on.
  12. _HAVE_RCS    := yes        # yes => RCS  is installed.
  13. _HAVE_SCCS    :=         # yes => SCCS is installed.
  14.  
  15. # Applicable suffix definitions
  16. A := .lib    # Libraries
  17. E := .exe    # Executables
  18. F := .for    # Fortran
  19. O := .obj    # Objects
  20. P := .pas    # Pascal
  21. S := .asm    # Assembler sources
  22. V :=         # RCS suffix
  23.  
  24. # See if these are defined
  25. TMPDIR := $(ROOTDIR)/tmp
  26. .IMPORT .IGNORE : TMPDIR SHELL COMSPEC
  27.  
  28. # Recipe execution configurations
  29. # First set SHELL, If it is not defined, use COMSPEC, otherwise
  30. # it is assumed to be MKS Korn SHELL.
  31. .IF $(SHELL) == $(NULL)
  32. .IF $(COMSPEC) == $(NULL)
  33.    SHELL := $(ROOTDIR)/bin/sh$E
  34. .ELSE
  35.    SHELL := $(COMSPEC)
  36. .END
  37. .END
  38. GROUPSHELL := $(SHELL)
  39.  
  40. # Now set remaining arguments depending on which SHELL we
  41. # are going to use.  COMSPEC (assumed to be command.com) or
  42. # MKS Korn Shell.
  43. .IF $(SHELL)==$(COMSPEC)
  44.    SHELLFLAGS  := $(SWITCHAR)c
  45.    GROUPFLAGS  := $(SHELLFLAGS)
  46.    SHELLMETAS  := *"?<>
  47.    GROUPSUFFIX := .bat
  48.    DIRSEPSTR   := \\
  49.    DIVFILE      = $(TMPFILE:s,/,\)
  50. .ELSE
  51.    SHELLFLAGS  := -c
  52.    GROUPFLAGS  := 
  53.    SHELLMETAS  := *"?<>|()&][$$\#`'
  54.    GROUPSUFFIX := .ksh
  55.    .MKSARGS    := yes
  56.    DIVFILE      = $(TMPFILE:s,/,${DIVSEP_shell_${USESHELL}})
  57.    DIVSEP_shell_yes := \\\
  58.    DIVSEP_shell_no  := \\
  59. .END
  60.  
  61. # Standard C-language command names and flags
  62.    CC      := tcc        # C-compiler and flags
  63.    CFLAGS  +=
  64.  
  65.    AS      := tasm        # Assembler and flags
  66.    ASFLAGS += 
  67.  
  68.    LD       = tlink        # Loader and flags
  69.    LDFLAGS +=
  70.    LDLIBS   =
  71.  
  72. # Definition of $(MAKE) macro for recursive makes.
  73.    MAKE = $(MAKECMD) $(MFLAGS)
  74.  
  75. # Language and Parser generation Tools and their flags
  76.    YACC      := yacc        # standard yacc
  77.    YFLAGS +=
  78.    YTAB      := ytab        # yacc output files name stem.
  79.  
  80.    LEX      := lex        # standard lex
  81.    LFLAGS +=
  82.    LEXYY  := lex_yy        # lex output file
  83.  
  84. # Other Compilers, Tools and their flags
  85.    PC    := tpc            # pascal compiler
  86.    RC    := anyf77        # ratfor compiler
  87.    FC    := anyf77        # fortran compiler
  88.  
  89.    CO       := co        # check out for RCS
  90.    COFLAGS += -q
  91.  
  92.    AR     := ar            # archiver
  93.    ARFLAGS+= ruv
  94.  
  95.    RM       := rm        # remove a file command
  96.    RMFLAGS +=
  97.  
  98. # Implicit generation rules for making inferences.
  99. # We don't provide .yr or .ye rules here.  They're obsolete.
  100. # Rules for making *$O
  101.    %$O : %.c ; $(CC) $(CFLAGS) -c $<
  102.    %$O : %$P ; $(PC) $(PFLAGS) -c $<
  103.    %$O : %$S ; $(AS) $(ASFLAGS) $(<:s,/,\);
  104.    %$O : %.cl ; class -c $<
  105.    %$O : %.e %.r %.F %$F ; $(FC) $(RFLAGS) $(EFLAGS) $(FFLAGS) -c $<
  106.  
  107. # Executables
  108.    %$E : %$O ; $(CC) $(LDFLAGS) -o$@ $< $(LDLIBS)
  109.  
  110. # lex and yacc rules
  111.    %.c : %.y ; $(YACC)  $(YFLAGS) $<; mv $(YTAB).c $@
  112.    %.c : %.l ; $(LEX)   $(LFLAGS) $<; mv $(LEXYY).c $@
  113.  
  114. # RCS support
  115. .IF $(_HAVE_RCS)
  116.    % : $$(@:d)RCS/$$(@:f)$V;- $(CO) $(COFLAGS) $@
  117.    .NOINFER : $$(@:d)RCS/$$(@:f)$V
  118. .END
  119.  
  120. # SCCS support
  121. .IF $(_HAVE_SCCS)
  122.    % : s.% ; get $<
  123.    .NOINFER : s.%
  124. .END
  125.  
  126. # Recipe to make archive files.
  127. %$A :
  128. [
  129.    $(AR) $(ARFLAGS) $@ $?
  130.    $(RM) $(RMFLAGS) $?
  131. ]
  132.  
  133. # DMAKE uses this recipe to remove intermediate targets
  134. .REMOVE :; $(RM) -f $<
  135.  
  136. # AUGMAKE extensions for SYSV compatibility
  137. @B = $(@:b)
  138. @D = $(@:d)
  139. @F = $(@:f)
  140. "*B" = $(*:b)
  141. "*D" = $(*:d)
  142. "*F" = $(*:f)
  143. <B = $(<:b)
  144. <D = $(<:d)
  145. <F = $(<:f)
  146. ?B = $(?:b)
  147. ?F = $(?:f)
  148. ?D = $(?:d)
  149.  
  150. # Turn warnings back to previous setting.
  151. .SILENT := $(__.SILENT)
  152.  
  153. # Local init file if any, gets parsed before user makefile
  154. .INCLUDE .IGNORE: "_startup.mk"
  155.